# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thomas Sarboni <max-k@post.com>

pkgname=python-pydispatcher
pkgver=2.0.6
pkgrel=3
pkgdesc="Multi-Producer Multi-Consumer Observer Pattern for Python"
url="https://github.com/mcfletch/pydispatcher"
arch=('any')
license=('BSD')
depends=('python')
makedepends=('python-setuptools')
source=("https://pypi.io/packages/source/P/PyDispatcher/PyDispatcher-$pkgver.tar.gz")
sha512sums=('516816cec6ea7cd623b1932ed2fb932029757cdb349d905d8940439b54ce0701d628a2cecb1280001c58b7fc3d8e12cc5cd94c6b89affb54a7e749a7c2ee70ba')

build() {
  cd PyDispatcher-$pkgver
  python setup.py build
}

check() {
  cd PyDispatcher-$pkgver
  python -m unittest discover
}

package() {
  cd PyDispatcher-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 license.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
}
